In article AA15592@iridium, "Christopher A. Stewart" <stewart@networx.com> () writes: > >>>>> "Mike" == Mike Raffety <mike_raffety@il.us.swissbank.com> writes: > > Mike> setuid programs don't produce core dumps; it's a security > Mike> feature. > > Huh? What *NIX are you using? I've not noticed that behavior.. > I must admit I hadn't noticed that, so I thought I'd try it. Use the following program (the numbers were randomly selected by hitting several number keys at once): /* dump_core.c */ main() { long *i=(long *)3249243; while(1) { *i=(long) i; i+=349; } } compile this, and when you run it it will core dump (providing you have unlimited core). If you setuid to root and run it as someone other than root, it just does a bus error and doesn't core dump! I'm running SunOS 4.1.3_U1. So it looks as if Mike Raffety has a point! Andrew. P.S. I just looked at the man page for core (5). To quote from it: The operating system writes out a memory image of a ter- minated process when any of various errors occur. See sigvec(2) for the list of reasons; the most common are memory violations, illegal instructions, bus errors, and user-generated quit signals. The memory image is called core and is written in the process's working directory (pro- vided it can be; normal access controls apply). Set-user-ID and set-group-ID programs do not produce core files when they terminate as this would cause a security loophole. ******************************************************************* * Andrew Beckett * * * Senior Design Engineer * * * Fujitsu Microelectronics Ltd * * * Highway House * phone : (0628) 71116 * * Norreys Drive * fax : (0628) 773990 * * Maidenhead. Berks SL6 4BW * email : a.beckett@fml.co.uk * *******************************************************************